function transformDate(time) {
  let d = new Date(time);
  let y = d.getFullYear();
  let m = d.getMonth() + 1 > 10 ? d.getMonth() + 1 : "0" + (d.getMonth() + 1);
  let r = d.getDate() > 10 ? d.getDate() : "0" + d.getDate();
  let h = d.getHours() > 10 ? d.getHours() : "0" + d.getHours();
  let f = d.getMinutes() > 10 ? d.getMinutes() : "0" + d.getMinutes();
  // padStart是ec6新增语法，可以用来自动补0
  let mm = (d.getSeconds()).toString().padStart(2,"0");
  return y + "-" + m + "-" + r + " " + h + ":" + f + ":" + mm;
}

// module.exports = {
//   transformDate
// };
export default {
    transformDate
}